<%--
  Created by IntelliJ IDEA.
  User: w1057229265
  Date: 2021/6/20
  Time: 16:24
  To change this template use File | Settings | File Templates.
--%>
<%--
  Created by IntelliJ IDEA.
  User: w1057229265
  Date: 2021/5/31
  Time: 16:10
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<script>
        let ro = $('#dg').datagrid('getSelected');
        $.ajax({
            type: "GET",
            url: "/ServletCar?action=getone",
            data: {bname: ro.bname},
            success: function (ret) {
                let result = eval("(" + ret + ")");
                console.log(result.data);
                if (result.code == "200") {
                    $('#bname').textbox({
                        readonly:true,
                        required:true,
                        validType:''
                    })
                    $('#ff').form('load', result.data);
                } else {
                    alert(result.msg)
                }
            }
        })
    ;
</script>
<form id="ff" method="post" style="padding: 5px;">

    <div style="margin-bottom:10px">
        <input class="easyui-textbox" id="bname" name="bname" style="width:90%" data-options="label:'书名:',required:true">
    </div>
    <div style="margin-bottom:10px">
        <input class="easyui-textbox" id="bprice" name="bprice" style="width:90%" data-options="label:'价格:'">
    </div>

</form>
